/*
 * socket-servidor.h
 *
 *  Created on: 03/10/2011
 *      Author: guido
 */

#ifndef SOCKET_SERVIDOR_H_
#define SOCKET_SERVIDOR_H_

#include "socket.h"
#include <unistd.h>
#include <netdb.h>

class SocketServidor {
	public:
		SocketServidor(short unsigned int puerto);
		~SocketServidor() {
			close(sockfd);
		}
		int aceptar();
		void cerrar() {
			shutdown(sockfd, SHUT_RDWR);
		}
	private:
		int sockfd;
};


#endif /* SOCKET_SERVIDOR_H_ */
